package br.ufpb.di.ppgi.negocio.modelo.participa;

import java.io.Serializable;

import javax.persistence.EmbeddedId;
import javax.persistence.Entity;

import br.ufpb.di.ppgi.negocio.modelo.defesa.Defesa;
import br.ufpb.di.ppgi.negocio.modelo.usuario.Usuario;

@Entity
public class ParticipaDefesa implements Serializable{

	private static final long serialVersionUID = 3268142873500954479L;

	@EmbeddedId
	private ParticipaDefesaPK pk;
	
	public ParticipaDefesa() {
		
	}

	public ParticipaDefesa(Defesa defesa, Usuario professor) {
		super();
		this.pk = new ParticipaDefesaPK(professor, defesa);
	}
	
	public ParticipaDefesa(ParticipaDefesaPK pk) {
		super();
		this.pk = pk;
	}

	public ParticipaDefesaPK getPk() {
		return pk;
	}

	public void setPk(ParticipaDefesaPK pk) {
		this.pk = pk;
	}
	
	public Defesa getDefesa() {
		return pk.getDefesa();
	}
	
	public Usuario getProfessor() {
		return pk.getProfessor();
	}
}
